<#setting number_format="#"/>
<script type="text/javascript">
$(document).ready(function(){
	$('div.pageBar #pag_nav_form img').hide();
	$('div.pageBar a').bind('click',function(){
		var topage = $(this).attr('page');
		$('input[name="current"]').val(topage);
		$('#pag_nav_form').attr('action',filterPara(self.location.href));
		$('#pag_nav_form').submit();
	});
	$('#submitBtn').click(function(){
		$('#seaBar form').submit();
	});
	$('body H2:first').append($('#seaBar'));
	$('#seaBar form').attr('action',BaseJs.getUri());
});
function filterPara(href){
	var a=href.indexOf('?');	
	if(a>0) return href.substring(0,a);
	return href;
}
</script>
<span id="seaBar">
	<form method="get">
		<input type="hidden" name="no" value="${current}" />
		<input type="hidden" name="size" value="${pageSize}" />
		<input type="hidden" name="store" />
		<input type="hidden" name="asc" />
		<#if showBar>
		<input type="text" style="width:300px;" name="key" maxlength="100" /><input type="button" style="width:50px;" id='submitBtn' value="搜索" /> </a>
		</#if>
	</form>
</span>

<div class="pageBar">
	<#-- 当前页为0时前页不能用 -->
	<form id="pag_nav_form" method="get" action="">
		<input type="hidden" name="current" value=${current} />
		<#list map?keys as key>
			<#if "current" != key&&"size"!=key>
				<#assign values = map[key]>
				<#list values as value>
					<#lt><input type="hidden" name="${key}" value="${value?js_string}" /><#rt>
				</#list>
			</#if>
		</#list><#rt>
		<#if (current==0) >
			<span class="disabled">&lt;&lt;</span><span class="disabled">&lt;</span>
		<#else>
			<a page="0" title="跳到首页">&lt;&lt;</a><a page="${current-1}" title="跳到${current}页">&lt;</a>
		</#if>
		<#if (current+1-4>0)>
		 	<#assign begin = current-3 >
		 <#else>
		 	<#assign begin = 1 >
		 </#if>
		 <#if (current+6 > pageCount)>
		 	<#if (pageCount==0)>
		 		<#assign end = 1 >
		 	<#else>
		 		<#assign end = pageCount >
		 	</#if>
		 <#else>
		 	<#assign end = current+6 >
		 </#if>
		<#list begin..end as p >
			<#if (current+1==p)>
				<span class="current" title="当前页面">${p}</span>
			<#else>
				<a title="跳到第${p}页" page="${p-1}">${p}</a>
			</#if>
		</#list>
		<#-- 末尾分页显示 -->
		<#if (pageCount - (current+1) > 0)>
			<a page="${current+1}"  title="跳到第${current+2}页">&gt;</a><a title="跳到最后页" page="${pageCount-1}">&gt;&gt;</a>
		<#else>
			<span class="disabled">&gt;</span><span class="disabled">&gt;&gt;</span>
		</#if>
		&nbsp;共${totalCount}条记录，共${pageCount}页
	</form>
</div>